<div class="main-content">
    <!-- Content Header (Page header) -->
    <div class="breadcrumbs" id="breadcrumbs">
    	<script type="text/javascript">
			try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
		</script>
		<ul class="breadcrumb">
			<li>
				<i class="icon-home home-icon"></i>
				<a href="#">系统首页</a>
			</li>

			<li>
				<a href="#">网站管理</a>
			</li>
			<li>
				<a href="#">轮播图片</a>
			</li>
			<li class="active">新增</li>
		</ul><!-- .breadcrumb -->
    </div>
    <div class="page-content">
        <div class="row">
            <div class="page-header">
    			<h1>新增轮播图片</h1>
    		</div>
    		<div class="col-xs-12 margin_t">
    		<?php if (validation_errors()!=''){?>
	           <div id="info_msg" class="alert alert-danger"><?php echo validation_errors();?></div>
	        <?php }?>
				<!-- PAGE CONTENT BEGINS -->

				<form id="usrform" role="form" action="<?php echo base_url().'admin/website/add_picture';?>" method="post">
					<div class="box-body" style="display: inline-block;width: 100%">
						<div class="form-group col-xs-6">
							<label>标题：</label>
							<input type="text" id="form-field-1" class="form-control" name="title" check-type="required" value="<?php echo set_value('title');?>"/>
						</div>
	                    <div class="form-group col-xs-6">
							<label>轮播图片(1920*650)：</label>
							<input id="jpg_file" class="form-control" name="img_url" type="text" placeholder="选择上传..." value="<?php echo set_value('img_url');?>" check-type="required" readonly="true">
							<a style="margin-top: -28px;float: right;height: 28px;border-radius:0px; " href="<?php echo site_url("admin/upyun/upload_modal/jpg_file")?>" data-target="#uploadModal" data-toggle="modal" class="btn btn-info">上传图片</a>
						</div>
	                    <div class="form-group col-xs-12">
							<label>内容：</label>
	                        <script id="editor" type="text/plain" style="width:100%;height:200px;"><?php echo set_value('editorValue');?></script>
						</div>
					</div>
                    <div class="clearfix form-actions">
						<div class="col-md-offset-3 col-md-9">
							<button class="btn btn-info" type="submit" id="btnSubmit">
								<i class="icon-ok bigger-110"></i>
								保存
							</button>
							&nbsp; &nbsp; &nbsp;
							<a class="btn" href="<?php echo base_url()."admin/website/picture"?>">
								<i class="icon-undo bigger-110"></i>
								返回
							</a>
						</div>
					</div>
				</form>
			</div>
			<!-- /.col -->
		</div><!-- /.row -->
	</div><!-- /.page-content -->
</div><!-- /.main-content -->
<script type="text/javascript" charset="utf-8" src="<?php echo base_url()."themes/default/js/ueditor/ueditor.config.js"?>"></script>
<script type="text/javascript" charset="utf-8" src="<?php echo base_url()."themes/default/js/ueditor/ueditor.all.min.js"?>"> </script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="<?php echo base_url()."themes/default/js/ueditor/lang/zh-cn/zh-cn.js"?>"></script>
<script type="text/javascript">
//实例化编辑器
//建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
var ue = UE.getEditor('editor');
</script>
<script type="text/javascript">
$("#usrform").validation();
//保存
$("#btnSubmit").on('click',function(event){
	// 2.最后要调用 valid()方法。
	if ($("#usrform").valid()==false){
		return false;
	}
});
</script>